//
//  ModuleVCOView.m
//  CocoaSynth
//
//  Created by Thomas Dupont on 18/02/10.
//  Copyright 2010 Apple Inc. All rights reserved.
//

#import "ModuleVCOView.h"

#import "ModuleViewController.h"


@implementation ModuleVCOView

- (id)initWithFrame:(NSRect)frameRect
{
	if (self = [super initWithFrame:frameRect]) {
		moduleImage = [NSImage imageNamed:@"vco.png"];
		moduleImageHighlight = [NSImage imageNamed:@"vco_highlight.png"];
	}
	return self;
}

- (void)drawRect:(NSRect)dirtyRect
{
	[[NSColor clearColor] set];
	[NSBezierPath fillRect:dirtyRect];
	if (highlight) {
		[moduleImageHighlight drawAtPoint:NSMakePoint(0, 0) fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1.0];
	} else {
		[moduleImage drawAtPoint:NSMakePoint(0, 0) fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1.0];
	}
}

@end
